import pymysql

def connect():
    conn = pymysql.connect(
        host='localhost',
        user='root',
        password='root',
        charset='utf8mb4',
        db='user'
    )
    cursor = conn.cursor()
    return conn, cursor

